import configparser
import sys
import os

CONF_FILE="./config.conf"
config = configparser.ConfigParser()
config.read(CONF_FILE)
for item in config['testparam1']:
    print('param 1:')
    print(config['testparam1'][item])

for item in config['testparam2']:
    print('param 2:')
    print(config['testparam2'][item])

print('get remoteip:')
r = config.get("testparam1","remoteip")
print(r)
print('get ghost opt case 1')
t1 = config.get("testparam3","remoteip")
print(t1)

print('get ghost opt case 2')
t2= config.get("testparam1","localip")
print(t2)
